<?php
namespace app\modules\adminapi\controllers;

use fate\http\Request;
use app\models\User;

class ForbiduserController extends \app\modules\adminapi\ForceLoginPure {

    public function run() {
        $req = Request::getInstance();

        $id = $req->getParameter('id');
        if(!is_numeric($id)) {
            $this->ajaxReturn(null, 300002);
            exit;
        }

        $model = new User();
        $data = [
            'status' => 0
        ];
        $ret = $model->update($id, $data);

        $this->ajaxReturn(null);
    }

}
